3.5.92 \(\int \sec ^4(e+f x) (a+b (c \tan (e+f x))^n)^p \, dx\) [492]

Optimal. Leaf size=160 \[ \frac {\, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{f}+\frac {\, _2F_1\left (\frac {3}{n},-p;\frac {3+n}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan ^3(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{3 f} \]

[Out]

hypergeom([-p, 1/n],[1+1/n],-b*(c*tan(f*x+e))^n/a)*tan(f*x+e)*(a+b*(c*tan(f*x+e))^n)^p/f/((1+b*(c*tan(f*x+e))^
n/a)^p)+1/3*hypergeom([-p, 3/n],[(3+n)/n],-b*(c*tan(f*x+e))^n/a)*tan(f*x+e)^3*(a+b*(c*tan(f*x+e))^n)^p/f/((1+b
*(c*tan(f*x+e))^n/a)^p)

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {3756, 1907, 252, 251, 372, 371} \begin {gather*} \frac {\tan ^3(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac {b (c \tan (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac {3}{n},-p;\frac {n+3}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )}{3 f}+\frac {\tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (\frac {b (c \tan (e+f x))^n}{a}+1\right )^{-p} \, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^4*(a + b*(c*Tan[e + f*x])^n)^p,x]

[Out]

(Hypergeometric2F1[n^(-1), -p, 1 + n^(-1), -((b*(c*Tan[e + f*x])^n)/a)]*Tan[e + f*x]*(a + b*(c*Tan[e + f*x])^n
)^p)/(f*(1 + (b*(c*Tan[e + f*x])^n)/a)^p) + (Hypergeometric2F1[3/n, -p, (3 + n)/n, -((b*(c*Tan[e + f*x])^n)/a)
]*Tan[e + f*x]^3*(a + b*(c*Tan[e + f*x])^n)^p)/(3*f*(1 + (b*(c*Tan[e + f*x])^n)/a)^p)

Rule 251

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 252

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[a^IntPart[p]*((a + b*x^n)^FracPart[p]/(1 + b*(x^n/a))^Fra
cPart[p]), Int[(1 + b*(x^n/a))^p, x], x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILt
Q[Simplify[1/n + p], 0] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 371

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*((c*x)^(m + 1)/(c*(m + 1)))*Hyperg
eometric2F1[-p, (m + 1)/n, (m + 1)/n + 1, (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] &&
 (ILtQ[p, 0] || GtQ[a, 0])

Rule 372

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[a^IntPart[p]*((a + b*x^n)^FracPart[p]/
(1 + b*(x^n/a))^FracPart[p]), Int[(c*x)^m*(1 + b*(x^n/a))^p, x], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[
p, 0] &&  !(ILtQ[p, 0] || GtQ[a, 0])

Rule 1907

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, n, p}, x] && (PolyQ[Pq, x] || PolyQ[Pq, x^n])

Rule 3756

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol] :> With[
{ff = FreeFactors[Tan[e + f*x], x]}, Dist[ff/(c^(m - 1)*f), Subst[Int[(c^2 + ff^2*x^2)^(m/2 - 1)*(a + b*(ff*x)
^n)^p, x], x, c*(Tan[e + f*x]/ff)], x]] /; FreeQ[{a, b, c, e, f, n, p}, x] && IntegerQ[m/2] && (IntegersQ[n, p
] || IGtQ[m, 0] || IGtQ[p, 0] || EqQ[n^2, 4] || EqQ[n^2, 16])

Rubi steps

\begin {align*} \int \sec ^4(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \, dx &=\frac {\text {Subst}\left (\int \left (c^2+x^2\right ) \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c^3 f}\\ &=\frac {\text {Subst}\left (\int \left (c^2 \left (a+b x^n\right )^p+x^2 \left (a+b x^n\right )^p\right ) \, dx,x,c \tan (e+f x)\right )}{c^3 f}\\ &=\frac {\text {Subst}\left (\int x^2 \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c^3 f}+\frac {\text {Subst}\left (\int \left (a+b x^n\right )^p \, dx,x,c \tan (e+f x)\right )}{c f}\\ &=\frac {\left (\left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}\right ) \text {Subst}\left (\int x^2 \left (1+\frac {b x^n}{a}\right )^p \, dx,x,c \tan (e+f x)\right )}{c^3 f}+\frac {\left (\left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}\right ) \text {Subst}\left (\int \left (1+\frac {b x^n}{a}\right )^p \, dx,x,c \tan (e+f x)\right )}{c f}\\ &=\frac {\, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan (e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{f}+\frac {\, _2F_1\left (\frac {3}{n},-p;\frac {3+n}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan ^3(e+f x) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{3 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 2.42, size = 122, normalized size = 0.76 \begin {gather*} \frac {\tan (e+f x) \left (3 \, _2F_1\left (\frac {1}{n},-p;1+\frac {1}{n};-\frac {b (c \tan (e+f x))^n}{a}\right )+\, _2F_1\left (\frac {3}{n},-p;\frac {3+n}{n};-\frac {b (c \tan (e+f x))^n}{a}\right ) \tan ^2(e+f x)\right ) \left (a+b (c \tan (e+f x))^n\right )^p \left (1+\frac {b (c \tan (e+f x))^n}{a}\right )^{-p}}{3 f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^4*(a + b*(c*Tan[e + f*x])^n)^p,x]

[Out]

(Tan[e + f*x]*(3*Hypergeometric2F1[n^(-1), -p, 1 + n^(-1), -((b*(c*Tan[e + f*x])^n)/a)] + Hypergeometric2F1[3/
n, -p, (3 + n)/n, -((b*(c*Tan[e + f*x])^n)/a)]*Tan[e + f*x]^2)*(a + b*(c*Tan[e + f*x])^n)^p)/(3*f*(1 + (b*(c*T
an[e + f*x])^n)/a)^p)

________________________________________________________________________________________

Maple [F]
time = 0.35, size = 0, normalized size = 0.00 \[\int \left (\sec ^{4}\left (f x +e \right )\right ) \left (a +b \left (c \tan \left (f x +e \right )\right )^{n}\right )^{p}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^4*(a+b*(c*tan(f*x+e))^n)^p,x)

[Out]

int(sec(f*x+e)^4*(a+b*(c*tan(f*x+e))^n)^p,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+b*(c*tan(f*x+e))^n)^p,x, algorithm="maxima")

[Out]

integrate(((c*tan(f*x + e))^n*b + a)^p*sec(f*x + e)^4, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+b*(c*tan(f*x+e))^n)^p,x, algorithm="fricas")

[Out]

integral(((c*tan(f*x + e))^n*b + a)^p*sec(f*x + e)^4, x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**4*(a+b*(c*tan(f*x+e))**n)**p,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^4*(a+b*(c*tan(f*x+e))^n)^p,x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Evaluation time: 1.8Unable to divide, perhaps due to rounding error%%%{1,[0,1,2,0,0]%%%}+%%%{1,[0,1,0,2,0]%
%%} / %%%{1

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (a+b\,{\left (c\,\mathrm {tan}\left (e+f\,x\right )\right )}^n\right )}^p}{{\cos \left (e+f\,x\right )}^4} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*(c*tan(e + f*x))^n)^p/cos(e + f*x)^4,x)

[Out]

int((a + b*(c*tan(e + f*x))^n)^p/cos(e + f*x)^4, x)

________________________________________________________________________________________